import {MockMethod} from 'vite-plugin-mock'
import {baseApi} from "../config";

export default [
    {
        url: `${baseApi}/system/post/add`,
        params: {
            "postId": 0,
            "postCode": "leader",
            "postName": "项目经理",
            "orderNum": 3,
            "status": 1,
            "remark": ""
        },
        method: 'post',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/post/delete`,
        method: 'delete',
        params: {"ids": [6]},
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/post/edit`,
        method: 'put',
        params: {
            "postId": 1,
            "postCode": "ceo",
            "postName": "董事长",
            "orderNum": 1,
            "status": 1,
            "remark": "",
            "createdBy": 0,
            "updatedBy": 0,
            "createdAt": "2024-08-28 22:26:18",
            "updatedAt": "2024-08-28 22:26:18",
            "deletedAt": null
        },
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/post/list`,
        //params:{postName:'',status:1,postCode:'',pageNum:1,pageSize:10},
        method: 'get',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": {
                    "currentPage": 1,
                    "total": 5,
                    "postList": [
                        {
                            "postId": 1,
                            "postCode": "ceo",
                            "postName": "董事长",
                            "orderNum": 1,
                            "status": 1,
                            "remark": "",
                            "createdBy": 0,
                            "updatedBy": 0,
                            "createdAt": "2024-08-28 22:26:18",
                            "updatedAt": "2024-08-28 22:26:18",
                            "deletedAt": null
                        },
                        {
                            "postId": 2,
                            "postCode": "se",
                            "postName": "项目经理",
                            "orderNum": 2,
                            "status": 1,
                            "remark": "",
                            "createdBy": 0,
                            "updatedBy": 0,
                            "createdAt": "2024-08-28 22:26:18",
                            "updatedAt": "2024-08-28 22:26:18",
                            "deletedAt": null
                        },
                        {
                            "postId": 3,
                            "postCode": "hr",
                            "postName": "人力资源",
                            "orderNum": 3,
                            "status": 1,
                            "remark": "",
                            "createdBy": 0,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:26:18",
                            "updatedAt": "2024-08-28 22:26:18",
                            "deletedAt": null
                        },
                        {
                            "postId": 4,
                            "postCode": "user",
                            "postName": "普通员工",
                            "orderNum": 4,
                            "status": 0,
                            "remark": "普通员工",
                            "createdBy": 0,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:26:18",
                            "updatedAt": "2024-08-28 22:26:18",
                            "deletedAt": null
                        },
                        {
                            "postId": 5,
                            "postCode": "it",
                            "postName": "IT部",
                            "orderNum": 5,
                            "status": 1,
                            "remark": "信息部",
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:26:18",
                            "updatedAt": "2024-08-28 22:26:18",
                            "deletedAt": null
                        }
                    ]
                }
            }
        }
    },
] as MockMethod[]
